﻿using Domain.Entities;
using FluentMigrator;
using FrameworkCore.Extensions;

namespace AiBLSmartEdu.Module.AIMedicalAssistant.API.Migrations;

[Migration(202506091821)]
public class KnowledgeBaseAddColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(MigrationExpressions.GetTableName(typeof(KnowledgeBase)))
          .AddColumn(MigrationExpressions.ColumnNameFor<KnowledgeBase>(nameof(KnowledgeBase.Title))).AsString(255).Nullable().WithColumnDescription("标题")
          .AddColumn(MigrationExpressions.ColumnNameFor<KnowledgeBase>(nameof(KnowledgeBase.Content))).AsString(int.MaxValue).Nullable().WithColumnDescription("内容")
          .AddColumn(MigrationExpressions.ColumnNameFor<KnowledgeBase>(nameof(KnowledgeBase.Path))).AsString(255).Nullable().WithColumnDescription("l路径");
    }
}